<h1>Багууд</h1>

<?php echo link_to('жагсаалт', 'team/index', array('class'=>'title'))?> 
<span class="separator"> | </span>
<?php echo link_to('шинээр нэмэх', 'team/new', array('class'=>'title'))?>
<br clear="all">
<br clear="all">

<table width="100%">
  <thead>
    <tr>
      <th>#</th>
      <th>Лого</th>
      <th>Нэр</th>
      <th>Товчилсон нэр</th>
      <th>Тухай</th>      
      <th>Зураг</th>
      <th>Компани</th>
      <th></th>
    </tr>
  </thead>
  <tbody>
    <?php $i = 0; foreach ($pager->getResults() as $bb_teams): ?>
    <tr>
	  <td><?php echo ++$i?></td>
	  <td><?php echo image_tag('/uploads/team/'.$bb_teams->getTEmblem(), array('style'=>'max-width:200px;max-height:100px;')) ?></td>
    <td><?php echo $bb_teams->getTName() ?></td>
    <td><?php echo $bb_teams->getTAbrname() ?></td>
    <td><?php echo $bb_teams->getTDescr() ?></td>      
	  <td><?php echo image_tag('/uploads/team/'.$bb_teams->getDefImg(), array('style'=>'max-width:200px;max-height:100px;')) ?></td>
    <td><?php echo $bb_teams->getTCity() ?></td>
	  <td nowrap>
        <a href="<?php echo url_for('team/edit?id='.$bb_teams->getId()) ?>">Засварлах</a><br><br>
        <a onclick="return confirm('Та итгэлтэй байна уу?')" href="<?php echo url_for('team/delete?id='.$bb_teams->getId()) ?>">Устгах</a>
      </td>
    </tr>
    <?php endforeach; ?>
  </tbody>
</table>

<?php echo pager($pager, 'team/index')?>